package com.lh.createData.dao;

import com.lh.createData.model.InPutParam.ProjAvgInParam;
import com.lh.createData.model.InPutParam.ProjAvgReportInParam;
import com.lh.createData.model.ProjAvgReportModel;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author ：梁昊，后端工程师：梁昊
 * @create 2021-07-20 19:07
 * @function
 * @editLog
 */
@Mapper
public interface ProjAvgMapper {
    /**
     * 年统计，仅比较年份
     *
     * @param projAvgInParam
     * @return
     */
    int deleteProjAvgByYear(ProjAvgInParam projAvgInParam);

    /**
     * 半年统计，比较年份与numIndex,0：表示上半年、1：下半年
     *
     * @param projAvgInParam
     * @return
     */
    int deleteProjAvgByHalfYear(ProjAvgInParam projAvgInParam);

    /**
     * 季度统计，比较年份与numIndex,第1，2，3，4季度
     *
     * @param projAvgInParam
     * @return
     */
    int deleteProjAvgBySeason(ProjAvgInParam projAvgInParam);

    /**
     * 月统计，比较年份与月数
     *
     * @param projAvgInParam
     * @return
     */
    int deleteProjAvgByMonth(ProjAvgInParam projAvgInParam);

    /**
     * 周统计，比较年份与周数，周数：1---52，包括1与52
     *
     * @param projAvgInParam
     * @return
     */
    int deleteProjAvgByWeek(ProjAvgInParam projAvgInParam);

    /**
     * 日统计，比较年份、月、日
     *
     * @param projAvgInParam
     * @return
     */
    int deleteProjAvgByDay(ProjAvgInParam projAvgInParam);

    /**
     * 增加项目加权平均值
     *
     * @param projAvgInParam com.lh.createData.model.InPutParam.ProjAvgInParam
     * @return 影响条数
     */
    int insertProjAvg(ProjAvgInParam projAvgInParam);

    /**
     * 按月、季度、半年、年统计项目加权平均值
     *
     * @param projAvgReportInParam com.lh.createData.model.InPutParam.ProjAvgReportInParam
     * @return 影响条数
     */
    List<ProjAvgReportModel> selectProjAvgByProjectAndTime(ProjAvgReportInParam projAvgReportInParam);

}